﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SALES_USER_SCHEDULER
// * CreateDate    : 2012/12/29 12:48:31
// * Creater       : SalesUserSchedulerEntity
// * LastChangeDate: 2012/12/29 12:48:31
// * LastChanger   : 2012/12/29 12:48:31
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class SalesUserSchedulerEntity : EntityBase
    {
        public SalesUserSchedulerTable TableSchema
        {
            get
            {
                return SalesUserSchedulerTable.Current;
            }
        }

        public SalesUserSchedulerEntity()
        {

        }

        public SalesUserSchedulerEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.SchedulerId = Convert.ToString(CommonFunctions.ToObject(dr["SCHEDULER_ID"]));
            this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
            this.AppAllDay = Convert.ToBoolean(CommonFunctions.ToObject(dr["APP_ALL_DAY"]));
            this.AppDescription = Convert.ToString(CommonFunctions.ToObject(dr["APP_DESCRIPTION"]));
            this.AppEnd = Convert.ToDateTime(CommonFunctions.ToObject(dr["APP_END"]));
            this.AppLabel = Convert.ToInt32(CommonFunctions.ToObject(dr["APP_LABEL"]));
            this.AppLocation = Convert.ToString(CommonFunctions.ToObject(dr["APP_LOCATION"]));
            //this.AppRecurrenceInfo = __UNKNOWN__xml(CommonFunctions.ToObject(dr["APP_RECURRENCE_INFO"]));
            //this.AppReminderInfo = __UNKNOWN__xml(CommonFunctions.ToObject(dr["APP_REMINDER_INFO"]));
            this.AppResourceId = Convert.ToInt32(CommonFunctions.ToObject(dr["APP_RESOURCE_ID"]));
            this.AppStart = Convert.ToDateTime(CommonFunctions.ToObject(dr["APP_START"]));
            this.AppStatus = Convert.ToString(CommonFunctions.ToObject(dr["APP_STATUS"]));
            this.AppSubject = Convert.ToString(CommonFunctions.ToObject(dr["APP_SUBJECT"]));
            this.AppType = Convert.ToString(CommonFunctions.ToObject(dr["APP_TYPE"]));
        }

        public SalesUserSchedulerEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.SchedulerId = Convert.ToString(CommonFunctions.ToObject(dr["SCHEDULER_ID"]));
            this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
            this.AppAllDay = Convert.ToBoolean(CommonFunctions.ToObject(dr["APP_ALL_DAY"]));
            this.AppDescription = Convert.ToString(CommonFunctions.ToObject(dr["APP_DESCRIPTION"]));
            this.AppEnd = Convert.ToDateTime(CommonFunctions.ToObject(dr["APP_END"]));
            this.AppLabel = Convert.ToInt32(CommonFunctions.ToObject(dr["APP_LABEL"]));
            this.AppLocation = Convert.ToString(CommonFunctions.ToObject(dr["APP_LOCATION"]));
            //this.AppRecurrenceInfo = __UNKNOWN__xml(CommonFunctions.ToObject(dr["APP_RECURRENCE_INFO"]));
            //this.AppReminderInfo = __UNKNOWN__xml(CommonFunctions.ToObject(dr["APP_REMINDER_INFO"]));
            this.AppResourceId = Convert.ToInt32(CommonFunctions.ToObject(dr["APP_RESOURCE_ID"]));
            this.AppStart = Convert.ToDateTime(CommonFunctions.ToObject(dr["APP_START"]));
            this.AppStatus = Convert.ToString(CommonFunctions.ToObject(dr["APP_STATUS"]));
            this.AppSubject = Convert.ToString(CommonFunctions.ToObject(dr["APP_SUBJECT"]));
            this.AppType = Convert.ToString(CommonFunctions.ToObject(dr["APP_TYPE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SalesUserSchedulerTable.Current;
            }
        }

        #region Perporty List
        public string SchedulerId
        {
            get { return Convert.ToString(GetData(SalesUserSchedulerTable.C_SCHEDULER_ID)); }
            set { SetData(SalesUserSchedulerTable.C_SCHEDULER_ID, value); }
        }

        public string PersonId
        {
            get { return Convert.ToString(GetData(SalesUserSchedulerTable.C_PERSON_ID)); }
            set { SetData(SalesUserSchedulerTable.C_PERSON_ID, value); }
        }

        public bool AppAllDay
        {
            get { return Convert.ToBoolean(GetData(SalesUserSchedulerTable.C_APP_ALL_DAY)); }
            set { SetData(SalesUserSchedulerTable.C_APP_ALL_DAY, value); }
        }

        public string AppDescription
        {
            get { return Convert.ToString(GetData(SalesUserSchedulerTable.C_APP_DESCRIPTION)); }
            set { SetData(SalesUserSchedulerTable.C_APP_DESCRIPTION, value); }
        }

        public DateTime AppEnd
        {
            get { return Convert.ToDateTime(GetData(SalesUserSchedulerTable.C_APP_END)); }
            set { SetData(SalesUserSchedulerTable.C_APP_END, value); }
        }

        public int AppLabel
        {
            get { return Convert.ToInt32(GetData(SalesUserSchedulerTable.C_APP_LABEL)); }
            set { SetData(SalesUserSchedulerTable.C_APP_LABEL, value); }
        }

        public string AppLocation
        {
            get { return Convert.ToString(GetData(SalesUserSchedulerTable.C_APP_LOCATION)); }
            set { SetData(SalesUserSchedulerTable.C_APP_LOCATION, value); }
        }

        //public __UNKNOWN__xml AppRecurrenceInfo
        //{
        //    get { return __UNKNOWN__xml(GetData(SalesUserSchedulerTable.C_APP_RECURRENCE_INFO)); }
        //    set { SetData(SalesUserSchedulerTable.C_APP_RECURRENCE_INFO, value); }
        //}

        //public __UNKNOWN__xml AppReminderInfo
        //{
        //    get { return __UNKNOWN__xml(GetData(SalesUserSchedulerTable.C_APP_REMINDER_INFO)); }
        //    set { SetData(SalesUserSchedulerTable.C_APP_REMINDER_INFO, value); }
        //}

        public int AppResourceId
        {
            get { return Convert.ToInt32(GetData(SalesUserSchedulerTable.C_APP_RESOURCE_ID)); }
            set { SetData(SalesUserSchedulerTable.C_APP_RESOURCE_ID, value); }
        }

        public DateTime AppStart
        {
            get { return Convert.ToDateTime(GetData(SalesUserSchedulerTable.C_APP_START)); }
            set { SetData(SalesUserSchedulerTable.C_APP_START, value); }
        }

        public string AppStatus
        {
            get { return Convert.ToString(GetData(SalesUserSchedulerTable.C_APP_STATUS)); }
            set { SetData(SalesUserSchedulerTable.C_APP_STATUS, value); }
        }

        public string AppSubject
        {
            get { return Convert.ToString(GetData(SalesUserSchedulerTable.C_APP_SUBJECT)); }
            set { SetData(SalesUserSchedulerTable.C_APP_SUBJECT, value); }
        }

        public string AppType
        {
            get { return Convert.ToString(GetData(SalesUserSchedulerTable.C_APP_TYPE)); }
            set { SetData(SalesUserSchedulerTable.C_APP_TYPE, value); }
        }

        #endregion
    }


}

